//
//  DDLoginManager.h
//  DingDongZP
//
//  Created by 王威 on 16/3/15.
//  Copyright © 2016年 iyhjiang.com. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DDLoginViewController.h"

@interface DDLoginManager : NSObject

+ (instancetype)sharedManager;

- (void)showLoginViewControllerFromWindow:(UIWindow *)window
                         showCancelButton:(BOOL)showCancel
                                  success:(DDLoginSuccessBlock)success
                                  failure:(DDLoginFailureBlock)failure
                                   cancel:(DDLoginCancelBlock)cancel;

- (void)showLoginViewControllerFromViewController:(UIViewController *)fromViewController
                                 showCancelButton:(BOOL)showCancel
                                          success:(DDLoginSuccessBlock)success
                                          failure:(DDLoginFailureBlock)failure
                                           cancel:(DDLoginCancelBlock)cancel;

- (BOOL)currentControllerIsLoginViewController:(UIWindow*)window;

- (BOOL)isLogin;
- (void)loginOut;

- (void)loginRongyun:(id (^)(NSString *userid))success failure:(id (^)(id error))failure;

@end
